const express = require('express');
const router = express.Router();
const recheckTaskController = require('../controllers/recheckTask.controller');
const { verifyToken, isTeacher } = require('../middlewares/auth.middleware');

// 根据用户ID分页获取复查任务列表 (需要教师权限)
router.get('/getAssignmentList', verifyToken, recheckTaskController.getAssignmentList);

// 根据复审ID修改复审记录 (需要token验证)
router.post('/updateTheRecheck', verifyToken, recheckTaskController.updateTheRecheck);

// 获取学生的试卷详情(复审批阅详情)
router.get('/getRecheckPaperDetails', verifyToken, recheckTaskController.getRecheckPaperDetails);

// 保存复审批阅详情
router.post('/saveRecheck', verifyToken, recheckTaskController.saveRecheck);

// 提交全部复审
router.post('/handleRecheck', verifyToken, recheckTaskController.handleRecheck);

module.exports = router;
